/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef TURBO_TRANS_PROTOBUF_UTIL_H
#define TURBO_TRANS_PROTOBUF_UTIL_H

#include "napi/native_api.h"

namespace turbo_trans_protobuf_util {
/**
 * 将PB二进制转换为js对象，默认是sendable对象，可以通过最后一个参数判断是否是sendable
 * @param env
 * @param info
 * @return
 */
napi_value Decode(napi_env env, napi_callback_info info);
/**
 * 将对象转换为二进制返回
 * @param env
 * @param info
 * @return
 */
napi_value Encode(napi_env env, napi_callback_info info);
} // namespace turbo_trans_protobuf_util

#endif // TURBO_TRANS_PROTOBUF_UTIL_H
